package cn.tedu.csmall.product.pojo.param;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 修改类别的参数类
 *
 * @author java@tedu.cn
 * @version 0.0.1
 */
@Data
@Accessors(chain = true)
public class CategoryUpdateInfoParam implements Serializable {

    /**
     * 类别名称
     */
    @NotNull(message = "添加类别失败，必须提交分类名称！")
    @ApiModelProperty(value = "类别名称", required = true, example = "可乐的类别")
    private String name;

    /**
     * 关键词列表，各关键词使用英文的逗号分隔
     */
    @ApiModelProperty(value = "类别关键词", required = true, example = "类别的关键词")
    private String keywords;

    /**
     * 排序序号
     */
    @NotNull(message = "添加类别失败，必须提交排序序号！")
    @Range(max = 99, message = "添加类别失败，排序序号值必须0~99之间！")
    @ApiModelProperty(value = "排序序号，必须是0~99之间的数字", required = true, example = "97")
    private Integer sort;

    /**
     * 图标图片的URL
     */
    private String icon;

}
